\documentclass[a4paper]{book}
\usepackage{a4wide}
\usepackage{makeidx}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{float}
\usepackage{alltt}
\usepackage{doxygen}
\usepackage{palatino}
\makeindex
\setcounter{tocdepth}{1}
%\setlength{\footrulewidth}{0.4pt}
\begin{document}

\title{Log Reference Manual}
\author{Wouter Caarls\\
Delft University of Technology\\
\emph{wcaarls@ph.tn.tudelft.nl}}

\maketitle

\clearemptydoublepage
\pagenumbering{roman}
\tableofcontents
\clearemptydoublepage
\pagenumbering{arabic}
\chapter{Example}

The following example shows the usage of the library.

\begin{verbatim}
#include <iostream>

#include <log.h>
#include <log.hpp>

CLog cpp_log;

int main(void)
{
  log_default_streams_t c_log = logGetDefaultStreams();

  logEdit(c_log.notice, LOG_GROUP_SET_LEVEL);
  cpp_log.notice.Edit(LOG_GROUP_SET_LEVEL);

  lprintf(STREAM(c_log.notice),
          "This is an example of a NOTICE message called from C");
  cpp_log.notice() << HDR
                   << "This is an example of a NOTICE message called from C++"
                   << std::endl;

  return 0;
}
\end{verbatim}

The result is

\begin{verbatim}
12:35:00.656 NTC [|main]: This is an example of a NOTICE message called from C
12:35:00.656 NTC [|main]: This is an example of a NOTICE message called from C++
\end{verbatim}
